package com.ruoyi.project.park.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.park.mapper.BizPaymentRecordsMapper;
import com.ruoyi.project.park.domain.BizPaymentRecords;
import com.ruoyi.project.park.service.IBizPaymentRecordsService;

/**
 * 充值记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-17
 */
@Service
public class BizPaymentRecordsServiceImpl implements IBizPaymentRecordsService 
{
    @Autowired
    private BizPaymentRecordsMapper bizPaymentRecordsMapper;

    /**
     * 查询充值记录
     * 
     * @param id 充值记录主键
     * @return 充值记录
     */
    @Override
    public BizPaymentRecords selectBizPaymentRecordsById(String id)
    {
        return bizPaymentRecordsMapper.selectBizPaymentRecordsById(id);
    }

    /**
     * 查询充值记录列表
     * 
     * @param bizPaymentRecords 充值记录
     * @return 充值记录
     */
    @Override
    public List<BizPaymentRecords> selectBizPaymentRecordsList(BizPaymentRecords bizPaymentRecords)
    {
        return bizPaymentRecordsMapper.selectBizPaymentRecordsList(bizPaymentRecords);
    }

    /**
     * 新增充值记录
     * 
     * @param bizPaymentRecords 充值记录
     * @return 结果
     */
    @Override
    public int insertBizPaymentRecords(BizPaymentRecords bizPaymentRecords)
    {
        bizPaymentRecords.setCreateTime(DateUtils.getNowDate());
        return bizPaymentRecordsMapper.insertBizPaymentRecords(bizPaymentRecords);
    }

    /**
     * 修改充值记录
     * 
     * @param bizPaymentRecords 充值记录
     * @return 结果
     */
    @Override
    public int updateBizPaymentRecords(BizPaymentRecords bizPaymentRecords)
    {
        bizPaymentRecords.setUpdateTime(DateUtils.getNowDate());
        return bizPaymentRecordsMapper.updateBizPaymentRecords(bizPaymentRecords);
    }

    /**
     * 批量删除充值记录
     * 
     * @param ids 需要删除的充值记录主键
     * @return 结果
     */
    @Override
    public int deleteBizPaymentRecordsByIds(String[] ids)
    {
        return bizPaymentRecordsMapper.deleteBizPaymentRecordsByIds(ids);
    }

    /**
     * 删除充值记录信息
     * 
     * @param id 充值记录主键
     * @return 结果
     */
    @Override
    public int deleteBizPaymentRecordsById(String id)
    {
        return bizPaymentRecordsMapper.deleteBizPaymentRecordsById(id);
    }
}
